﻿<Page x:Class="App96.MainPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:local="using:App96"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <Grid.DataContext>
            <local:ViewModel />
        </Grid.DataContext>
        <StackPanel HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Orientation="Vertical">
            <TextBox Width="200"
                     Height="200"
                     FontSize="24"
                     IsReadOnly="True"
                     Text="{Binding Header, Mode=TwoWay}"
                     TextWrapping="Wrap" />
            <ScrollViewer Width="200"
                          MaxHeight="200"
                          Background="White"
                          VerticalScrollBarVisibility="Auto">
                <ItemsControl ItemsSource="{Binding Items}">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <CheckBox Content="{Binding Text}"
                                      FontSize="24"
                                      Foreground="Black"
                                      IsChecked="{Binding IsChecked, Mode=TwoWay}"
                                      IsThreeState="False" />
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
            </ScrollViewer>
        </StackPanel>
    </Grid>
</Page>
